package com.qianxp.designparttern.proxy;

/**
 *@author qianxp
 */
public class ProxyTest {
    public static void main(String[] args) {
//        cglibTest();
        jdkProxyTest();
    }

    private static void cglibTest() {
        CglibProxy cglibProxy = CglibProxy.getInstance();
        Woman woman = (Woman) cglibProxy.getProxy(WomanMatchMaker.class);
        woman.findLove();
    }

    private static void jdkProxyTest() {
        JdkProxy jdkProxy = JdkProxy.getInstance();
        Person person = (Person) jdkProxy.getProxy(WomanMatchMaker.class);
        person.findLove();
    }
}